/**
 * 
 */
package com.joyzone.weixin.security;

import net.sf.json.JSONObject;

/**
 * 公众号全局唯一票据model
 * 
 * @author yulm
 * @date 2014-01-22
 */
public class AccessToken {

	// 获取到的凭证
	public String AccessToken;
	// 凭证有效时间（单位：秒）
	public long ExpiresIn;
	// 凭证失效时间（UTC时间）
	public long OutOfServiceTime;
	
	public AccessToken(JSONObject data){
		AccessToken = data.getString("access_token");
		ExpiresIn = data.getInt("expires_in");
	}
	
	public String getAccessToken() {
		return AccessToken;
	}
	public void setAccessToken(String accessToken) {
		AccessToken = accessToken;
	}
	public long getExpiresIn() {
		return ExpiresIn;
	}
	public void setExpiresIn(long expiresIn) {
		ExpiresIn = expiresIn;
	}
	public long getOutOfServiceTime() {
		return OutOfServiceTime;
	}
	public void setOutOfServiceTime(long outOfServiceTime) {
		OutOfServiceTime = outOfServiceTime;
	}
	
}
